home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / comm / bbs / str_utilities3.lha / str.utils / STR.DLDir.rexx < prev    next >
OS/2 REXX Batch file  |  1994-06-25  |  918b  |  47 lines

  1. /*
  2.  
  3.     STR.DLDir.rexx - Download a *WHOLE* directory in E!  Be careful with
  4.                      this one folks!
  5.  
  6.     Version 1.01
  7.  
  8. */
  9.  
  10. options results
  11.  
  12. if ~show('l','rexxsupport.library') then do
  13.   if ~addlib('rexxsupport.library',0,-30,0) then do
  14.     print 'RexxSupport.Library missing! Can''t continue...'
  15.     exit 10
  16.   end
  17. end
  18.  
  19. print
  20. query '\c6Enter the path to the directory \c7(\c6include \c7":" \c6or \c7"/")\c6:\n2>\c7'
  21. dir = result
  22.  
  23. if dir = '' then exit
  24.  
  25. if ~exists(dir) then do
  26.   print
  27.   print '\c1That directory doesn''t exist!\n1'
  28.   exit
  29. end
  30.  
  31. files = showdir(dir,'f','01'x)
  32. files = translate(files,'02'x,' ')
  33. files = translate(files,' ','01'x)
  34.  
  35. print
  36. do i = 1 to words(files)
  37.   file = translate(word(files,i),' ','02'x)
  38.   sendstring '\c6'file' \c7- \c2'
  39.   markfile dir||file
  40.   print '\c2Marked!'
  41. end
  42. print
  43.  
  44. print '\c6Finished!  Marked 'words(files)' files.  Use \c7DL\c6 to download the files.\n1'
  45.  
  46. exit
  47.